import request from '@/utils/request'

export function carSelectListManage() {
  return request({
    url: '/admin/manage/car/carSelectList',
    method: 'get',
  })
}
// 查询优惠券模块-优惠券列表
export function couponListManage(query) {
  return request({
    url: '/admin/manage/couponList',
    method: 'get',
    params: query
  })
}


// 查询优惠券模块-优惠券详细
export function couponGetManage(id) {
  return request({
    url: 'admin/manage/coupon/getInfo/' + id,
    method: 'get'
  })
}

// 新增优惠券模块-优惠券
export function couponAddManage(data) {
  return request({
    url: 'admin/manage/grant/addCoupon',
    method: 'post',
    data: data
  })
}
export function grantCouponManage(data) {
  return request({
    url: 'admin/manage/grant/coupon',
    method: 'post',
    data: data
  })
}

// 修改优惠券模块-优惠券
export function couponUpdateManage(data) {
  return request({
    url: 'admin/manage/grant/updateCoupon',
    method: 'post',
    data: data
  })
}

// 删除优惠券模块-优惠券
export function couponDelManage(id) {
  return request({
    url: '/admin/manage/coupon/delCoupon/' + id,
    method: 'delete'
  })
}

// 查询优惠券模块-套餐列表
export function thailListManage(query) {
  return request({
    url: 'admin/manage/thali/list',
    method: 'get',
    params: query
  })
}
export function couponSelectListManage() {
  return request({
    url: 'admin/manage/coupon/couponSelectList',
    method: 'get',
  })
}

// 查询优惠券模块-套餐详细
export function thailGetManage(id) {
  return request({
    url: '/admin/manage/thali/query/' + id,
    method: 'get'
  })
}

// 新增套餐
export function thailAddManage(data) {
  return request({
    url: '/admin/manage/grant/thali/',
    method: 'post',
    data: data
  })
}

// 修改套餐
export function thailUpdateManage(data) {
  return request({
    url: 'admin/manage/thali/edit',
    method: 'post',
    data: data
  })
}

// 删除套餐
export function thailDelManage(id) {
  return request({
    url: 'admin/manage/grant/delThail/' + id,
    method: 'delete'
  })
}
//初始化地图
export function initMapManage(id) {
  return request({
    url: 'map/init/map',
    method: 'get'
  })
}

// 查询地图模块-地图列表
export function mapListManage(query) {
  return request({
    url: 'admin/manage/map/list',
    method: 'get',
    params: query
  })
}

// 查询地图模块-地图详细
export function mapGetManage(id) {
  return request({
    url: 'admin/manage/map/query/' + id,
    method: 'get'
  })
}

// 新增地图模块-地图
export function mapAddManage(data) {
  return request({
    url: 'admin/manage/map/add',
    method: 'post',
    data: data
  })
}

// 修改地图模块-地图
export function mapUpdateManage(data) {
  return request({
    url: 'admin/manage/map/edit',
    method: 'post',
    data: data
  })
}

// 删除地图模块-地图
export function mapDelManage(id) {
  return request({
    url: 'admin/manage/map/remove/' + id,
    method: 'delete'
  })
}
// 查询券码发布历史列表
export function couponExchangeListManage(query) {
  return request({
    url: '/admin/manage/couponExchange/list',
    method: 'get',
    params: query
  })
}
